package com.yzc.util;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Map;

public class ArgUtils {
	public static void fillargsMapfromArgs(Map<String, String> argsMap, String[] args) {
		for (String arg : args) {
			String[] s = arg.split("=");
			argsMap.put(s[0], s[1]);
		}
	}

	public static BufferedReader getWebFile(String webXmlVersion) {
		try {
			InputStream in = ArgUtils.class.getResource("/com/yzc/webxml/web-"+ webXmlVersion +".xml").openStream();
			InputStreamReader isr = new InputStreamReader(in);
			BufferedReader bufferedReader = new BufferedReader(isr);
			return bufferedReader;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
		
	}

}
